"""
URL configuration for travel_plan project.
"""
from django.contrib import admin
from django.urls import path, include
from apps.utils.views import HealthzView
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/attractions/', include('apps.attractions.urls')),
    path('api/routes/', include('apps.routes.urls')),
    path('api/users/', include('apps.users.urls')),
    path('api/itineraries/', include('apps.itineraries.urls')),
    path('api/social/', include('apps.social.urls')),
    path('api/notifications/', include('apps.notifications.urls')),
    path('api/healthz', HealthzView.as_view()),
]

# 开发环境下提供媒体文件服务
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

